package com.tpod.taxi.service;


import tpod.network.HTTPCachePolicy;
import tpod.network.HTTPRequest;

import kds.business.BaseService;
import kds.business.BusinessDelegate;

import android.util.Log;

import com.tpod.taxi.APIAccessAddressBuilder;
import com.tpod.taxi.TaxiApplication;
import com.tpod.taxi.entity.City;

public class CityService extends BaseService<City> {

	public CityService() {
		businessReponse = new CityReponse();
	}

	public void getListCity(BusinessDelegate<City> delegate) {
		this.addBusinessDelegate(delegate);

		APIAccessAddressBuilder builder = new APIAccessAddressBuilder(
				TaxiApplication.CITY_API,"city");
		Log.i("CityService", "url : " + builder.getURL());
		HTTPRequest request = new HTTPRequest(builder.getURL(), this);
		request.setCachePolicy(HTTPCachePolicy.LOCAL);
		request.send();
	}

}
